//
//  ZSButton.m
//  UIA段项目 墨家天气
//
//  Created by dllo on 15/8/27.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ZSButton.h"

@implementation ZSButton

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(void)dealloc
{
    
    [_title release];
    [_imageV release];
    [_detail release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    
    
    self = [super initWithFrame:frame];
    if (self) {

        self.title = [[UILabel alloc]init];
        self.title.textColor = [UIColor whiteColor];
        self.title.font =[UIFont boldSystemFontOfSize:13];
        [self addSubview:_title];
        [_title release];
        
        
        
        self.imageV = [[UIImageView alloc]init];
        [self addSubview:_imageV];
        [_imageV release];
        
        
        
        self.detail = [[UILabel alloc]init];
        self.detail.textColor = [UIColor whiteColor];
        [self addSubview:_detail];
        [_detail release];
        
    }
    
    
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.title.frame  = CGRectMake(90 * OffWidth, 10 * OffHeight, 80 * OffWidth, 20 * OffHeight);
    self.imageV.frame  = CGRectMake(10 * OffWidth, 10 * OffHeight, 30 * OffWidth, 30 * OffHeight);
    self.detail.frame  = CGRectMake(90 * OffWidth, 30 * OffHeight, 80 * OffWidth, 20 * OffHeight);
 
}

@end
